home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / ODF Release 3 / ODFDev / ODF / OS / FWToolbx / FWColorP.h < prev    next >
Encoding:
Text File  |  1996-12-16  |  1.7 KB  |  60 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWColorP.h
  4. //    Release Version:    $ ODF 3 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWCOLORP_H
  11. #define FWCOLORP_H
  12.  
  13. #ifndef FWCOLOR_H
  14. #include "FWColor.h"
  15. #endif
  16.  
  17. //========================================================================================
  18. //    Forward Class Declarations
  19. //========================================================================================
  20.  
  21. class FW_CColorPicker;
  22. class FW_CWritableStream;
  23. class FW_CReadableStream;
  24.  
  25. //========================================================================================
  26. //    Global operators << and >>
  27. //========================================================================================
  28.  
  29. FW_CWritableStream& operator<<(FW_CWritableStream& stream, const FW_CColorPicker& colorPicker);
  30. FW_CReadableStream& operator>>(FW_CReadableStream& stream, FW_CColorPicker& colorPicker);
  31.  
  32. //========================================================================================
  33. // CLASS FW_CColorPicker
  34. //========================================================================================
  35.  
  36. class FW_CColorPicker
  37. {
  38. public:
  39.     FW_CColorPicker();
  40.     FW_CColorPicker(FW_CReadableStream& stream);
  41.     
  42.     ~FW_CColorPicker();
  43.  
  44.  
  45.     void         SetColor(const FW_CColor& color);
  46.     FW_CColor     GetColor() const;
  47.     
  48.     FW_Boolean    PickNewColor();
  49.     
  50.     // ----- Persistence -----
  51.     void        Read(FW_CReadableStream& stream);
  52.     void        Write(FW_CWritableStream& stream) const;
  53.  
  54. private:
  55.     FW_CColor    fColor;
  56.     FW_CColor    fCustomColors[16];
  57.     
  58. };
  59.  
  60. #endif